<?php
?>

	<style>
		tr{
		    overflow: hidden;
		    max-height: 100px;
		    word-break: break-word;
		}
	</style>
	
	<ul class="breadcrumb">
	  <li><a href="<?php echo $this->webroot;?>">Home</a> <span class="divider">/</span></li>
	  <li class="active"><?php echo __("Lista Helper") ?></li>
	</ul>
	
      <table class="table table-condensed table-bordered">
        <thead>
          <tr>
		        <th  style="width:10%;"  ><?php echo __('Codice')?></th>
		        <th  style="width:10%;" ><?php echo __('Area Tematica')?></th>
		        <th  style="width:10%;"><?php echo __('Titolo')?></th>
		        <th><?php echo __('Testo')?></th>
		        <th  style="width:8%;"><?php echo __('Pubblicato')?></th>
		        <th  style="width:10%;"><?php echo __('Data Pubblicazione')?></th>
		        <th></th>
		        <th></th>
          </tr>
        </thead>
        <tbody>
			<?php foreach ($helps as $help): ?> 
			<tr>
				<?php if ($help['Help']['rowspan']<>0) { ?>
					<td rowspan="<?php echo $help['Help']['rowspan'] ?>"><?php echo $help['Help']['codice']; ?></td>
				<?php } ?>
				<td><?php echo $help['CategoryLang']['name']; ?></td>
				<td><?php echo html_entity_decode($help['HelpLang']['titolo']); ?></td> 
				<td class="hideOverflow"><div style="overflow-y:scroll; width:100%"><?php echo html_entity_decode($help['HelpLang']['testo']); ?></div></td> 
				<td><?php echo $help['Help']['pubblicato']==1?"<span class='label label-success'>Sì</span>":"<span class='label label-default'>No</span>"; ?></td>
				<td><?php echo $help['Help']['dt_ins']; ?></td> 
				<td><?php echo $this->Acl->link("<i class='icon-pencil'></i>",array("controller" => "Help", 'action' => 'edit', $help['Help']['id']), array('escape'=>false));  ?></td>
				<td><?php echo $this->Acl->link("<i class='icon-trash'></i>",array("controller" => "Help", 'action' => 'delete', $help['Help']['id']), array('data-confirm'=>'true', 'escape'=>false));  ?></td>
			</tr>
			<?php endforeach; ?>
			<?php unset($helps); ?> 
			<tr >
				<td colspan='8'><?php echo $this->Acl->link("<i class='icon-plus'></i>", "/Help/add", array('escape'=>false));  ?></td>
			</tr>					
        </tbody>
      </table>

